﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Framework.Helper.Helpers.CurrentLimitingHelpers
{
    /// <summary>
    /// 用于在限流队列中传递请求信息和回调
    /// </summary>
    public class CurrentLimitingModel
    {
        /// <summary>
        /// 请求执行委托
        /// 封装需要限流执行的任务
        /// </summary>
        public Func<string> Action { get; set; }

        /// <summary>
        /// 任务完成源对象
        /// 用于在异步上下文中同步返回结果
        /// </summary>
        public TaskCompletionSource<string> ResultTcs { get; set; }
    }
}
